package com.longxiao.enums;

/**
 * Created by yusong on 2017/5/5.
 * 用户类型
 */
public enum UserType {
    Stu(1,"Student"),
    Tch(2,"Teacher")
    ;
    UserType(int code, String des) {
        this.code = code;
        this.des = des;
    }

    private int code;
    private String des;

    public static boolean valid(int code){
        return UserType.Stu.getCode() != code || UserType.Tch.getCode() != code;
    }


    public int getCode() {
        return code;
    }

    public String getDes() {
        return des;
    }
}
